package com.atxiao.task.taskdemo.service;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
public class taskServiceImpl implements taskService{
    @Override
//    @Scheduled(initialDelay = 1000,fixedDelay = 3000)
    public void taskFirst() {
        System.out.println("第一个定时任务开始执行。。。。");
    }

   @Override
//    @Scheduled(initialDelay = 2000,fixedDelay = 1000)
    public void taskSecond() {
        System.out.println("第二个定时任务开始执行。。。。");
    }

//    @Scheduled(cron = "*/10 * * * * *")
    public void taskThird(){
        System.out.println("第三个定时任务开始执行。。。。");
    }

//    @Scheduled(cron = "0 19 11 * * *")
    public void taskFourth(){
        System.out.println("第四个定时任务开始执行。。。。");
    }
}
